﻿using System;
using EzDesk.Apps.Interface.ProjectModule;
using EzDesk.Apps.ServiceImpl.ProjectModule;
using EzDesk.Utility.TimerService;
using EzDesk.Utility.ServiceStatusInfo;
using EzDesk.Utility.Web.ServiceReference;


namespace EzDesk.Clients.DesktopWeb.TimerTask
{
    public class TaskDailyWorkBlog:EverydayTimerTask
    {
        private readonly IProjectService _projectService = new ProjectService();
        IProjectService ProjectService
        {
            get { return _projectService; }
        }
        public TaskDailyWorkBlog()
            : base("TaskDailyWorkBlog", TimeSpan.FromHours(23))
        {

        }
        protected sealed override void doExecute()
        {
            ProjectService.SendDailyWorkBlog();
        }
    }
    public class TaskWorkitemExpired :  EverydayTimerTask
    {
        private readonly IProjectService _projectService = new ProjectService();
        IProjectService ProjectService
        {
            get { return _projectService; }
        }
        public TaskWorkitemExpired()
            : base("WorkitemExpiredTask", TimeSpan.FromHours(0))
        {

        }
        protected sealed override void doExecute()
        {
            ProjectService.CheckTimeOutWorkItems();
        }
    }
}
